<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <h2>{{message}}</h2>
    <h2 v-if="score>=90">优秀</h2>
    <h2 v-else-if="score>=80">良好</h2>
    <h2 v-else-if="score>=60">及格</h2>
    <h2 v-else>不及格</h2>

    <h1>{{result}}</h1>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
    const app = new Vue({
        el: '#app',
        data: {
            message: 'simplelu',
            score: 80
        },
        // 使用计算属性达到上面的效果
        computed: {
            result() {
                let message = '';
                if (this.score >= 90){
                    message = '优秀';
                }else if (this.score >= 80) {
                    message = '良好';
                }else if (this.score >= 60) {
                    message = '及格';
                }else {
                    message = '不及格';
                }
                return message;
            }
        }
    })
</script>
</body>
</html>